﻿using System.Collections.Generic;
using Microsoft.TeamFoundation.Client;

namespace Broadbeach.Core
{
    public class ScriptServerPathProvider : IScriptServerPathProvider
    {
        private readonly IDictionary<TfsTeamProjectCollection, string> _paths = new Dictionary<TfsTeamProjectCollection, string>();

        public void Add(TfsTeamProjectCollection collection, string serverPath)
        {
            _paths.Add(collection,serverPath);
        }

        public string GetScriptServerPath(TfsTeamProjectCollection collection)
        {
            if (!_paths.ContainsKey(collection)) return null;
            return _paths[collection];
        }
    }
}